package org.dromara.bykt.domain.vo;

import org.dromara.bykt.domain.BYKTCourseVideo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;


/**
 * 课程视频视图对象 course_video
 *
 * @author Hou
 * @date 2025-06-22
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BYKTCourseVideo.class)
public class BYKTCourseVideoVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 视频ID
     */
    @ExcelProperty(value = "视频ID")
    private Long id;

    /**
     * 课程ID
     */
    @ExcelProperty(value = "课程ID")
    private Long courseId;

    /**
     * 章节ID
     */
    @ExcelProperty(value = "章节ID")
    private Long chapterId;

    /**
     * 视频标题
     */
    @ExcelProperty(value = "视频标题")
    private String title;

    /**
     * 视频地址
     */
    @ExcelProperty(value = "视频地址")
    private String url;

    /**
     * 视频时长（秒）
     */
    @ExcelProperty(value = "视频时长", converter = ExcelDictConvert.class)
//    @ExcelDictFormat(readConverterExp = "秒=")
    private Long duration;

    /**
     * 排序号
     */
    @ExcelProperty(value = "排序号")
    private Long sort;

    /**
     * 是否免费（0免费 1收费）
     */
    @ExcelProperty(value = "是否免费", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=否,1=是")
    private String isFree;

    /**
     * 观看次数
     */
    @ExcelProperty(value = "观看次数")
    private Long viewCount;

    private Boolean expanded;

    private Integer type;

    private Long categoryId;
}
